<extend name="Layout:layout_edit" />
<block name="body_content_block">
    <taglib name="Common\TagLib\Sohtml"/>
    <form action="{:AddonU('Extension/seat_batch_edit_save')}" method="post">
        <table class="table-grid">
            <tr><th>分机号</th><th>姓名</th><th>角色</th></tr>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.userName}<input type='hidden' name='id[]' value="{$vo.id}" /></td>
                    <td><input type="text" name="personalName[]" value="{$vo.personalName}" required="required" /></td>
                    <td><sohtml:radio name="ctiModel{$vo.id}" items="1=一线;2=二线;3=三线" required="required" data-value="{$vo.ctiModel}" /></td>
                <tr>
            </foreach>
        </table>        
    </form>
</block>
<block name="body_after_block">
    <script type="text/javascript">
        item_form.resize_owner_dialog({width: 370});
        $('td :radio').each(function(){
            var $this=$(this);
            if($this.data('value')==$this.val()){
                $this.prop('checked',true);
            }
        })
    </script>
</block>